package com.example.phoneshop.entity;

import java.math.BigDecimal;
import java.lang.String;

/**
 * Create by zw ON 2018/7/9 15:42
 */
public class CartItem {
    private Goods goods;//商品类，在数据库中，
    private int count; //数量
    public Goods getGoods() {
        return goods;
    }
    public void setGood(Goods good) {
        this.goods = good;
    }
    public int getCount() {
        return count;
    }
    public void setCount(int count) {
        this.count = count;
    }
    public BigDecimal getSubtotal() {
        BigDecimal bg1=new BigDecimal(goods.getGood_price());
        BigDecimal bg2=new BigDecimal(count);
        BigDecimal bg3;
        bg3=bg1.multiply(bg2);
        return bg3;
    }


}


